 <template>
    <el-table :data="currentPageData" style="width: 100%; font-size: 20px; text-align: center;"
        @selection-change="xuan" ref="selection">
        <el-table-column type="selection" width="55" />
        <el-table-column property="stuNo" label="学号" width="200" align="center" sortable />
        <el-table-column property="className" label="班级" width="220" align="center" />
        <el-table-column property="stuName" label="学生姓名" width="200" align="center" />
        <el-table-column property="collegeName" label="学院名称" width="240" align="center" />
        <el-table-column property="origin" label="市场部" width="240" align="center" />
        <el-table-column property="expertiseName" label="专业" align="center" width="240" />
        <el-table-column property="workCity" label="工作城市" width="240" align="center" />
        <el-table-column label="操作" align="center">
            <template #default="scope">
                <el-button id="but1" @click="watch(scope.$index, scope.row)">查看</el-button>
                <el-button id="but1" @click="edit(scope.$index, scope.row)">修改</el-button>
                <el-popconfirm confirm-button-text="确定" cancel-button-text="取消" :icon="InfoFilled" icon-color="#626AEF"
                    title="你确定要删除吗?" @confirm="del(scope.$index, scope.row)" @cancel="cancelEvent">
                    <template #reference>
                        <el-button id="but1">删除</el-button>
                    </template>
                </el-popconfirm>
            </template>
        </el-table-column>
    </el-table>
</template>

<script setup>
import { defineProps, defineEmits } from 'vue'

const props = defineProps({
    currentPageData: Array,
    InfoFilled: Object
})

const emit = defineEmits(['selection-change', 'watch', 'edit', 'del', 'cancelEvent'])

const xuan = (selection) => {
    emit('xuan', selection)
}

const watch = (index, row) => emit('watch', index, row)
const edit = (index, row) => emit('edit', index, row)
const del = (index, row) => emit('del', index, row)
const cancelEvent = () => emit('cancelEvent')
</script>
<style scoped lang="scss">
#but1 {
    width: 80px;
    height: 40px;
    margin-bottom: 20px;
    background-color: #214bc9;
    color: #fff;
    font-size: 20px;
}
</style>